/*
 Copyright (C) 2013 Yuyao Liang

 This source code is release under the BSD License.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.
 

 */
package com.googlecode.stereoplot;

import org.jfree.data.ComparableObjectItem;

/**
 * @author lianyuy
 * 
 */
public class StereoPlotDataItem extends ComparableObjectItem {

	private static final long serialVersionUID = 6345376936475893646L;

	/**
	 * @param x
	 * @param y
	 */
	public StereoPlotDataItem(int index, StereoPlotDataPoint point) {
		super(index, point);
	}

	public double getAzimuth() {
		StereoPlotDataPoint obj = (StereoPlotDataPoint) getObject();
		if (obj != null) {
			return obj.getAzimuth();
		}
		return Double.NaN;
	}

	public double getDeviate() {
		StereoPlotDataPoint obj = (StereoPlotDataPoint) getObject();
		if (obj != null) {
			return obj.getDeviate();
		}
		return Double.NaN;
	}

	public double getValue() {
		StereoPlotDataPoint obj = (StereoPlotDataPoint) getObject();
		if (obj != null) {
			return obj.getValue();
		}
		return Double.NaN;

	}

}
